// AboutDialog.cpp

#include "StdAfx.h"

#include "AboutDialog.h"
#include "HelpUtils.h"
#include "Common/Lang/LangUtils.h"

using namespace Common;

static Lang::CIDLangPair kIDLangPairs[] =
{
  { IDC_ABOUT_STATIC_REGISTER_INFO, 0x01000103 },
  { IDC_ABOUT_BUTTON_SUPPORT, 0x01000104 },
  { IDC_ABOUT_BUTTON_REGISTER, 0x01000105 },
  { IDOK, 0x02000702 }
};

#define MY_HOME_PAGE TEXT("http://www.7-zip.org/")

static LPCTSTR kHomePageURL     = MY_HOME_PAGE;

static LPCTSTR kHelpTopic = _T("start.htm");

LRESULT CAboutDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
  Lang::LangSetWindowText(HWND(*this), 0x01000100);
  Lang::LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
 CenterWindow(GetParent());
  return TRUE;
}

LRESULT CAboutDialog::OnHomeCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
	{	
		
		::ShellExecute(NULL, NULL, kHomePageURL, NULL, NULL, SW_SHOWNORMAL);
		return 0;
	}
